home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / ixemlsrc.lha / ixemul / library / smallfuncs.c < prev    next >
C/C++ Source or Header  |  1995-12-23  |  2KB  |  107 lines

  1. /*
  2.  *  This file is part of ixemul.library for the Amiga.
  3.  *  Copyright (C) 1991, 1992  Markus M. Wild
  4.  *  Portions Copyright (C) 1994 Rafael W. Luebbert
  5.  *
  6.  *  This library is free software; you can redistribute it and/or
  7.  *  modify it under the terms of the GNU Library General Public
  8.  *  License as published by the Free Software Foundation; either
  9.  *  version 2 of the License, or (at your option) any later version.
  10.  *
  11.  *  This library is distributed in the hope that it will be useful,
  12.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.  *  Library General Public License for more details.
  15.  *
  16.  *  You should have received a copy of the GNU Library General Public
  17.  *  License along with this library; if not, write to the Free
  18.  *  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  *
  20.  *  $Id: smallfuncs.c,v 1.1 1994/06/24 22:10:32 rluebbert Exp $
  21.  *
  22.  *  $Log: smallfuncs.c,v $
  23.  * Revision 1.1  1994/06/24  22:10:32  rluebbert
  24.  * Initial revision
  25.  *
  26.  */
  27.  
  28. #include <unistd.h>
  29.  
  30. int chown(const char *s, uid_t usr, gid_t gr)
  31. {
  32.   return 0;
  33. }
  34.  
  35. struct group *getgrent(void)
  36. {
  37.   return 0;
  38. }
  39.  
  40. int setgrent (void)
  41. {
  42.   return 1;
  43. }
  44.  
  45. void endgrent ()
  46. {
  47. }
  48.  
  49. gid_t getgid(void)
  50. {
  51.   return 0;
  52. }
  53.  
  54. uid_t getuid(void)
  55. {
  56.   return 0;
  57. }
  58.  
  59. gid_t getegid(void)
  60. {
  61.   return 0;
  62. }
  63.  
  64. uid_t geteuid(void)
  65. {
  66.   return 0;
  67. }
  68.  
  69. pid_t getppid(void)
  70. {
  71.   /* all processes have been started by init :-)) */
  72.   return 1;
  73. }
  74.  
  75. /* not really useful.. but it's there ;-)) */
  76.  
  77. int getpagesize(void)
  78. {
  79.   return 2048;
  80. }
  81.  
  82. int initgroups(const char *name, int basegid)
  83. {
  84.   return 0;
  85. }
  86.  
  87. extern char _ctype_[];
  88. extern int sys_nerr;
  89.  
  90. void ix_get_vars (char **ctype, int *_sys_nerr)
  91. {
  92.   if (ctype)
  93.     *ctype = _ctype_;
  94.   if (_sys_nerr)
  95.     *_sys_nerr = sys_nerr;
  96. }
  97.  
  98. int setgroups(int ngroups, const int *gidset)
  99. {
  100.   return (ngroups >= 1) ? 0 : -1;
  101. }
  102.  
  103. int setpgrp(pid_t pid, pid_t pgrp)
  104. {
  105.   return pid==pgrp ? 0 : -1;
  106. }
  107.